const {override, fixBabelImports, addLessLoader, addWebpackAlias} = require('customize-cra');
const path = require("path");

module.exports = function override(config, env) {
    return config;
};
module.exports = override(
    fixBabelImports('import', {
        libraryName: 'antd-mobile',
        style: true
    }),
    //使用less-loader对源码重的less的变量进行设置antd自定义主题
    addLessLoader({
        javascriptEnabled: true,
        modifyVars: {
            "@brand-primary": '#64BFBB',
            "@brand-primary-tap": '#5aaca8',
            "@fill-body": '#fff'
        }
    }),
    //增加路径别名的处理
    addWebpackAlias({
        '@': path.resolve('./src')
    })
);